When you invoke a compiler driver with source files as arguments, the driver calls other commands that compile your source code into object code. It then optimizes the object code (if requested to do so) and links together the object files, the default libraries, and any other libraries you specify.
Given a source file foo.c, the default name for the object file is foo.o. The default name for an executable file is a.out. The following example compiles source files foo.c and bar.c with the default options:
This example produces two object files (foo.o and bar.o), then links them with the default C library libc to produce an executable called a.out.cc foo.c bar.c
Note: If you compile a single source directly to an executable, the compiler does not create an object file.